<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui" 
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>TODO supply a title</title>
    </h:head>
    <h:body>
        <ui:composition template="./HomeTemp.xhtml">
            <ui:define name="listevent">
                <div style="width: 78%; margin-left: 22%">
                 <h:form id="form">  
                     
                     <p:dataGrid var="event" value="#{eventBean.eventListDetail}" columns="3" style="font-size: 12px"
                    rows="12" paginator="true"  
                    paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                    rowsPerPageTemplate="9,12,15">  
                        <p:panel header="Event: #{event.eventName}" style="font-size: 18px">  
                                <table>
                                    <tr>
                                        <td valign="top" style="width: 55%">
                                            <p:graphicImage style="width: 92%; height: 85%;" value="../Images/laser-event.jpg"/>
                                        </td>
                                        <td  valign="top">
                                            <div>
                                                <table>
                                                    <tr>
                                                        <td valign="top">
                                                            <h:outputText value="Address: " />
                                                        </td>
                                                        <td>
                                                            <h:outputText value="#{event.eventID}" /> 
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td valign="top">
                                                            <h:outputText value="Start Date: " />
                                                        </td>
                                                        <td>
                                                            <h:outputText value="#{event.startDate}" /> 
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td valign="top">
                                                            <h:outputText value="End Date: " />
                                                        </td>
                                                        <td>
                                                            <h:outputText value="#{event.endDate}" /> 
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td valign="top">
                                                            <h:outputText value="Price: " />
                                                        </td>
                                                        <td>
                                                            <h:outputText value="#{event.price}" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td valign="top">
                                                            <h:outputText value="Name Win: " /> 
                                                        </td>
                                                        <td>
                                                            <h:outputText value="#{event.nameWin}" /> 
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td valign="top">
                                                            <h:outputText value="Description: " /> 
                                                        </td>
                                                        <td>
                                                            <h:outputText value="#{event.description}" /> 
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                            <p:commandButton style="margin: 15% 0 0 15%; float: left; font-size: 14px"  value="Adherence" action="#{registerBean.registerEvent()}" title="View Detail">  
                                                <f:param name="readherence" value="Adherence"/>
                                                <f:param name="regisEvent" value="#{event.eventID}"/>
                                            </p:commandButton> 
                                            <p:commandButton style="margin: 15% 0 0 4%; float: left; font-size: 14px" value="Presentation" action="#{registerBean.registerEvent()}" title="View Detail">  
                                                
                                                <f:param name="regisEvent" value="#{event.eventID}"/>
                                            </p:commandButton>
                                        </td>
                                    </tr>
                                </table>
                             
                        </p:panel>       
                    </p:dataGrid>  
                     
                     <p:dialog header="Option" widgetVar="eventDialog" width="400" modal="true">  
                        <p:outputPanel id="carDetail"  layout="block">  
                            <h:panelGrid id="display" style="margin: 0 auto;" columns="2" cellpadding="4"> 
                                <h:commandButton action="#{eventBean.registerEvent()}" value="Adherence">
                                    
                                    <f:param name="readherence" value="Adherence"/>
                                </h:commandButton>
                                <h:commandButton value="presentation"></h:commandButton>
                            </h:panelGrid>
                        </p:outputPanel>  
                    </p:dialog>  
                 </h:form>
                </div>
            </ui:define>
        </ui:composition>
    </h:body>
</html>
